import {api} from './api';
import http from '../utils/http'; // 导入http中创建的axios实例
import qs from 'qs'; // post请求序列化
const functionList = {
  // 招聘职位
  PositionVacant(params,ID) {
    return http.post(api.PositionVacant+'/'+ID, qs.stringify(params));
  },
  // 用户投递简历
  SendUserResume(params,ID){
	  return http.post(api.SendUserResume+'/'+ID, qs.stringify(params));
  },
  //查询收藏状态
  CheckCollect(params,ID){
	  return http.post(api.CheckCollect+'/'+ID, qs.stringify(params))
  },
  //用户收藏
  ApplyCollect(params,ID){
  	  return http.post(api.ApplyCollect+'/'+ID, qs.stringify(params));
  },
  //获取用户收藏列表
  getUserCollectList(params,ID) {
    return http.get(api.getUserCollectList+'/'+ID,{params:params});
  },
  //获取用户应聘记录
  getUserApplicationRecord(ID){
	  return http.get(api.getUserApplicationRecord+'/'+ID);
  },
  //查询合同状态
  lookForContract(type,ID,index){
	  return http.get(api.lookForContract+'/'+type+'/'+ID+'/'+index);
  },
  performContract(params){
	  return http.post(api.performContract,qs.stringify(params))
  }
};
export default functionList;